
//
//  PhotoBrowserViewFlowLayout.swift
//  PhotoBrowser
//
//  Created by 林彬 on 16/4/28.
//  Copyright © 2016年 linbin. All rights reserved.
//

import UIKit

class PhotoBrowserViewFlowLayout: UICollectionViewFlowLayout {

    override func prepareLayout() {
//        itemSize = CGSize(width: UIScreen.mainScreen().bounds.size.width, height: UIScreen.mainScreen().bounds.size.height - 144)
        
        // cell的宽高和collectionView的宽高一样.
        itemSize = (collectionView?.bounds.size)!
        // 可翻页
        collectionView?.pagingEnabled = true
        // 水平滑动
        scrollDirection = .Horizontal
        collectionView?.showsHorizontalScrollIndicator = false
        collectionView?.showsVerticalScrollIndicator = false
        
        minimumInteritemSpacing = 0
        minimumLineSpacing = 0
        
    }
}
